package com.bytedance.social.mapper;

import com.bytedance.social.pojo.User;
import com.bytedance.social.pojo.UserFavorite;
import com.bytedance.social.pojo.Video;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SocailMapper {

    public Video selectVideoById(@Param("videoId") Long videoId);

    public Integer upVideoFavorite(@Param("videoId") Long videoId, @Param("favoriteCount") Long favoriteCount);

    public Integer insertUserFavorite(@Param("userId") Long userId, @Param("videoId") Long videoId);

    public Integer deleteUserFavorite(@Param("userId") Long userId, @Param("videoId") Long videoId);

    public List<UserFavorite> selectUserFavoriteById(@Param("userId") Long userId);

    public User selectUserById(@Param("userId") Long userId);

    public UserFavorite selectUserFavorited(@Param("userId") Long userId, @Param("videoId") Long videoId);

    public void upUserFavorCount(@Param("userId") Long userId, @Param("favoriteCount") Long favoriteCount);

    public void upUserTotalFavor(@Param("userId") Long userId, @Param("totalFavor") Long totalFavor);


}
